//
// Created by Nasa on 2024/5/4.
// 质数筛

#include <vector>
#include <iostream>

using namespace std;

int main()
{
    int n = 1000;
    bool isp[n + 1] = {0};
    vector<int> p;
    for (int i = 2; i <= n; ++i)
    {
        isp[i] = true;
    }
    for (int i = 2; i <= n; ++i)
    {
        if (isp[i])
        {
            p.push_back(i);
        }
        for (int j : p)
//        for(int j=0;j<=p.size() && i*j<=n;++j)
        {
            if (i*j<=n)
            {
                isp[i * j] = false;
                if (i % j == 0)
                {
                    break;
                }
            }

        }
    }
    cout<<p.size();
    return 0;
}